package com.sikaryofficial.workbench.config.handler.impl;

import com.sikaryofficial.workbench.config.handler.BusinessCodeStrategy;
import org.apache.ibatis.reflection.MetaObject;

import java.time.LocalDate;

/**
 * @author : wuweihong
 * @desc : TODO  请填写你的功能描述
 * @date : 2024-09-30
 */

public class DefaultCodeStrategy implements BusinessCodeStrategy {
    @Override
    public String generateCode(MetaObject metaObject) {
        LocalDate localDate = LocalDate.now();
        int currYear = localDate.getYear();
        int currMonth = localDate.getMonthValue();

        return currYear + "_" + currMonth;
    }
}
